<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>登陆</title>
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="../../static/css/lib/bootstrap3.4.1.min.css" th:href="@{/css/lib/bootstrap3.4.1.min.css}">
    <!-- Favicon-->
    <link rel="shortcut icon" href="../../static/img/favicon.png?3" th:href="@{/img/favicon.png}">
    <!-- font CSS-->
    <link rel="stylesheet" href="../../static/css/lib/material-design-icons.min.css" th:href="@{/css/lib/material-design-icons.min.css}">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="../../static/css/main.css" th:href="@{/css/main.css}">

    <style>
        .demo{
            position:fixed;
            top: 0;
            left: 0;
            width:100%;
            height:100%;
            min-width: 1000px;
            z-index:-10;
            zoom: 1;
            background-color: #fff;
        }
        .title{
            position: absolute;
            top: 45%;
            left: 6%;
        }
        .wrapper {
            position: absolute;
            left: 68%;
            top: 25%;
            width: 22%;
            background-color: #19236A;
        }
        .login {
            display: flex !important;
            width: 100%;
        }
        .login-center {
            min-width: 80%;
            padding: 2em;
            border-radius: 5px;
            margin: 1.2em 0;
        }
        .login-header {
            margin-bottom: 2rem !important;
        }
        .login-center .has-feedback.feedback-left .form-control {
            padding-left: 12%;
            padding-right: 5%;
        }
        .login-center .has-feedback.feedback-left .form-control-feedback {
            left: 0;
            right: auto;
            width: 28px;
            height: 38px;
            line-height: 38px;
            z-index: 10;
            color: #dcdcdc;
        }
        .login-center .has-feedback.feedback-left.row .form-control-feedback {
            left: 15px;
        }
    </style>

</head>

<body onload="getCode();">

    <img class="demo" src="../../static/img/loginBackground.png" th:src="@{/img/loginBackground.png}" style="width: 100%;height: 120%">
    <div class="title">
        <img src="../../static/img/title.png" th:src="@{/img/title.png}" style="width: 55%">
    </div>
    <div class="row wrapper">
        <div class="login">
            <div class="login-center">
                <div class="login-header text-center">
                    <img src="../../static/img/loginWrite.png" th:src="@{/img/loginWrite.png}" style="width: 60%;">
                </div>
                <form action="/user/login" method="post">
                    <div class="form-group has-feedback feedback-left">
                        <input type="text" placeholder="请输入您的用户名" class="form-control" name="loginName"/>
                        <span class="mdi mdi-account form-control-feedback" aria-hidden="true"></span>
                    </div>
                    <div class="form-group has-feedback feedback-left">
                        <input type="password" placeholder="请输入密码" class="form-control" name="pwd" />
                        <span class="mdi mdi-lock form-control-feedback" aria-hidden="true"></span>
                    </div>
                    <div class="form-group has-feedback feedback-left row">
                        <div class="col-xs-7">
                            <input type="text" placeholder="验证码" class="form-control" name="verifyCode" />
                            <span class="mdi mdi-check-all form-control-feedback" aria-hidden="true"></span>
                        </div>
                        <div class="col-xs-5" onclick="getCode();">
                            <img id="verifyImg" class="pull-right" style="cursor: pointer; max-width: 300px;" title="点击刷新" alt="captcha">
                        </div>
                    </div>
                    <div class="form-group">
                        <button class="btn btn-block btn-primary" type="submit">立即登录</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

<!-- JavaScript files-->
<!-- jquery.js -->
<script src="../../static/js/lib/jquery.min.js" th:src="@{/js/lib/jquery.min.js}"></script>
<script>
    function getCode() {
        document.getElementById("verifyImg").src = "/user/verifyCode";
    }

</script>

</body>
</html>